/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.res0w.SMMS.ui.login;

import com.res0w.SMMS.ui.admin.AdminWindow;
import java.awt.Point;
import java.awt.Polygon;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

/**
 *
 * @author res0w
 * @since 2009-9-26
 * @version 0.2
 */
public class SignInWindow extends JFrame {

    private GameSignInPanel GSI;
    private static Polygon polygon;

    public SignInWindow() {

        Point[] points = new Point[]{
            new Point(0, 26),
            new Point(426, 26),
            new Point(426, 0),
            new Point(866, 0),
            new Point(866, 26),
            new Point(887, 26),
            new Point(887, 296),
            new Point(866, 296),
            new Point(866, 311),
            new Point(426, 311),
            new Point(426, 296),
            new Point(0, 296),};
        polygon = new Polygon();
        for (int i = 0; i < points.length; i++) {
            polygon.addPoint(points[i].x, points[i].y);
        }
        GSI = new GameSignInPanel(this);
        this.getContentPane().add(GSI);
//        this.setAlwaysOnTop(true);
        this.setUndecorated(true);
        this.setTitle("河北经贸大学运动会管理系统");
        this.setLocationRelativeTo(null);
        this.pack();
        this.setVisible(true);
        com.sun.awt.AWTUtilities.setWindowShape(this, polygon);
    }

    public static void main(String[] args) {
        try {
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(AdminWindow.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            Logger.getLogger(AdminWindow.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(AdminWindow.class.getName()).log(Level.SEVERE, null, ex);
        } catch (UnsupportedLookAndFeelException ex) {
            Logger.getLogger(AdminWindow.class.getName()).log(Level.SEVERE, null, ex);
        }
        java.awt.EventQueue.invokeLater(
                new Runnable() {

                    @Override
                    public void run() {
                        SignInWindow sm = new SignInWindow();
                        sm.setLocationRelativeTo(null);
                        sm.setVisible(true);

                    }
                });
    }
}
